package com.hospital.service.impl;

import com.hospital.dao.DoctorSitDao;
import com.hospital.domain.DoctorSit;
import com.hospital.domain.Register;
import com.hospital.service.DoctorSitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DoctorSItServiceImpl implements DoctorSitService {

    @Autowired
    DoctorSitDao doctorSitDao;

    @Override
    public List<DoctorSit> selectDoctorSitByUDoctorID(int doctorID) {
        return doctorSitDao.selectDoctorDitByDoctorID(doctorID);
    }

    @Override
    public int subRemain(DoctorSit doctorSit) {
        return doctorSitDao.subRemain(doctorSit);
    }

    @Override
    public Integer addDoctorSit(DoctorSit doctorSit) {
        return doctorSitDao.addDoctorSit(doctorSit);
    }

    @Override
    public List<DoctorSit> selectDoctorSit(String DoctorName) {
        return doctorSitDao.selectDoctorSit(DoctorName);
    }

    @Override
    public int addRemain(Register register) {
        return doctorSitDao.addRemain(register);
    }

    @Override
    public DoctorSit selectDoctorSitBySitIDAndDoctorID(int doctorID, int sitID) {
        return doctorSitDao.selectDoctorSitBySitIDAndDoctorID(doctorID,sitID);
    }
}
